define(function(require, exports){
	var pubjs = require('pubjs');
	var grid  = require('@base/highGrid');
	var util = require('util');

	// 频道管理
	var AdChannels = grid.base.extend({
		init: function(config){
			config = pubjs.conf(config, {
					url: 'massChannel/list',
					cols: [
						{name:'_id',text:"ID", sort: true},
						{name:'op',text:LANG("操作"), type: 'op'},
						{name:'Name',text:LANG("名称"), type:'index', width: 200}
					],
					metrics: [
						{name:'CreateTime',text:LANG("创建时间"),  width: 80, render: 'renderTime', align: 'left'}
					],
					reqType: 'websocket',
					gridName: 'mediaChannel',
					hasTab: false,
					hasAmount: false,
					hasExport: false,
					hasSubGrid: false
				}
			);
			this.Super('init', arguments);
		},
		renderTime: function( i, val ) {
			return val ? util.date("Y-m-d", val) : '-';
		}
	});
	exports.base = AdChannels;
});